package com.cxh.mchat;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * Created by cxh on 2021/11/21
 */
@SpringBootApplication
@ServletComponentScan
@MapperScan(basePackages = {"com.cxh.mchat.*.mapper"})
@EnableTransactionManagement
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
        System.out.println(
                "////////////////////////////////////////////////// //////////////////////////////////////////////////\n" +
                "//                                           MChat 后台启动成功!                                     //\n" +
                "////////////////////////////////////////////////// //////////////////////////////////////////////////\n");
    }

    /**
     * 访问首页提示
     *
     * @return /
     */
    @GetMapping("/")
    public String index() {
        return "Mchat service started successfully";
    }
}
